<?php date_default_timezone_set('Asia/Makassar') ?>
<h4>BIODATA &raquo; BIODATA MAHASISWA &raquo; <span class="current_page">EDIT DATA MAHASISWA</span></h4>

            <!-- Begin three column window -->
<div class="onecolumn" style="padding-bottom:20px">
    <form action="" method="post">

    <?php if($biodata != NULL): ?>
    <div class="header">
    <span>EDIT BIODATA MAHASISWA</span>
	</div>   <?php endif; ?>
	<br class="clear"/>


<div class="text">
<br />

<?php if($biodata == NULL): ?>
<div align="center">
<div style="width:500px">
   <div id="p_messages_error">
        Maaf, data tidak dapat ditampilkan. Mungkin ada gangguan teknis. Silakan menghubungi bagian terkait.
    </div>
</div>
</div>

<?php else: ?>
<div align="center">
   <div class="data_mhs">
     <div style="width:580px">
       <div align="left" style="font-family:arial; font-size: 2.5em; color: #F0F0F0; letter-spacing: -3px;">
         <img src="<?php echo site_url("images/1datamhs.png")?> " />
       </div>
     </div>
     <table class="uiTableList" cellpadding="5" cellspacing="0" border="0">
       <tr align="left">
         <td width="180">Nama Lengkap</td>
         <td><b><?php echo $biodata->NAMA ?></b></td>
       </tr>
       <tr align="left">
         <td width="180">Program Studi</td>
         <td width="380"><?php echo ucwords(strtolower($biodata->NAMA_PRODI)) ?></td>
       </tr>
       <tr align="left">
         <td>NIM</td>
         <td><?php echo $biodata->NIM ?></td>
       </tr>
       <tr align="left">
         <td>Status</td>
         <td><?php if($biodata->STATUS == "REGISTRASI AKTIF"): ?><span class="active_student"><?php echo $biodata->STATUS ?></span><?php else:?> <span class="warning_red"><?php echo $biodata->STATUS?></span><?php endif;?></td>
       </tr>
       <tr align="left">
         <td>Dosen Pembimbing Akademik</td>
         <td><?php echo $biodata->DOSEN_PEMBIMBING ?><?php echo ($biodata->GELAR)? ', '.$biodata->GELAR:'' ?></td>
       </tr>
       <tr align="left">
         <td>Kelompok Kelas</td>
         <td><?php echo $biodata->KELOMPOK_KELAS ?></td>
       </tr>
       <tr align="left">
         <?php $js_tgl = 'id="tgl_lahir" onchange="return checkDate(\'tgl_lahir\',\'bln_lahir\',\'thn_lahir\');"' ?>
         <?php $js_bln = 'id="bln_lahir" onchange="return checkDate(\'tgl_lahir\',\'bln_lahir\',\'thn_lahir\');"' ?>
         <?php $js_thn = 'id="thn_lahir" onchange="return checkDate(\'tgl_lahir\',\'bln_lahir\',\'thn_lahir\');"' ?>
         <td>Tempat/Tanggal Lahir</td><?php $tgl = date("j", strtotime($biodata->TANGGAL_LAHIR)); ?> <?php $bln = date("n", strtotime($biodata->TANGGAL_LAHIR)); ?> <?php $thn = date("Y", strtotime($biodata->TANGGAL_LAHIR)); ?>
         <td>
          <input class="data_input" type="text" value="<?php echo set_value('tempat_lahir', isset($biodata->TEMPAT_LAHIR) ? $biodata->TEMPAT_LAHIR : '');?>" id="tempat_lahir" name="tempat_lahir"> / <?php echo form_dropdown('tgl_lahir', generate_options_int_sequence(1,31),set_value('tgl_lahir',isset($tgl)? $tgl : ''),$js_tgl); ?> <?php echo form_dropdown('bln_lahir', generate_options_month(),set_value('bln_lahir',isset($bln)? $bln : ''),$js_bln); ?>
          <?php echo form_dropdown('thn_lahir', generate_options_int_sequence(1940,date('Y')),set_value('thn_lahir',isset($thn)? $thn : ''),$js_thn); ?>
         </td>
       </tr>
       <tr align="left">
          <td>Alamat Asal</td>
          <td><input type="text" value="<?php echo set_value('alamat_asal', isset($biodata->ALAMAT_ASAL) ? $biodata->ALAMAT_ASAL : '');?>" id="alamat_asal" name="alamat_asal"></td>
       </tr>
       <tr align="left">
          <td>Alamat di Mataram</td>
          <td><input type="text" value="<?php echo set_value('alamat', isset($biodata->ALAMAT) ? $biodata->ALAMAT : '');?>" id="alamat" name="alamat"></td>
       </tr>
       <tr align="left">
         <td>Agama</td>
         <td><?php echo form_dropdown('agama', generate_options($select_options_agama,'NO','DESKRIPSI'), set_value('agama',isset($biodata->ID_AGAMA)? $biodata->ID_AGAMA : '')); ?></td>
       </tr>
       <tr align="left">
         <td>Jenis Kelamin</td>
         <td><?php echo ucwords(strtolower($biodata->JENIS_KELAMIN)) ?></td>
       </tr>
       <tr align="left">
          <td>Nomor Telepon</td>
          <td><input class="data_input" type="text" value="<?php echo set_value('no_telp', isset($biodata->NO_TELP) ? $biodata->NO_TELP : '');?>" id="no_telp" name="no_telp"></td>
       </tr>
      </table>
   </div>
</div>
<br />
<div align="center">
   <div class="data_mhs">
     <div style="width:580px">
       <div align="left" style="margin-top:5px;font-family:arial; font-size: 2.5em; color: #F0F0F0; letter-spacing: -3px;">
         <img src="<?php echo site_url("images/2asalsklh.png")?> " />
       </div>
     </div>
     <table class="uiTableList" cellpadding="5" cellspacing="0" border="0">
       <tr align="left">
          <td width="180">Propinsi Asal SMA</td>
          <td width="380"><?php echo form_dropdown('asal_sma', generate_options($select_options_sma,'ID','DESKRIPSI','ori'), set_value('asal_sma',isset($biodata->ID_ASAL_SMA)? $biodata->ID_ASAL_SMA : '')); ?></td>
       </tr>
     </table>
   </div>
</div>
<br />
<div align="center">
   <div class="data_mhs">
     <div style="width:580px">
       <div align="left" style="margin-top:5px;font-family:arial; font-size: 2.5em; color: #F0F0F0; letter-spacing: -3px;">
         <img src="<?php echo site_url("images/3dataklg.png")?> " />
       </div>
     </div>
     <table class="uiTableList" cellpadding="5" cellspacing="0" border="0">
       <tr align="left">
         <td>Nama Ayah</td>
         <td width="380"><input type="text" value="<?php echo set_value('nama_ayah', isset($biodata->NAMA_AYAH) ? $biodata->NAMA_AYAH : '');?>" id="nama_ayah" name="nama_ayah"></td>
       </tr>
       <tr align="left">
          <td>Nama Ibu</td>
          <td><input type="text" value="<?php echo set_value('nama_ibu', isset($biodata->NAMA_IBU) ? $biodata->NAMA_IBU : '');?>" id="nama_ibu" name="nama_ibu"></td>
       </tr>
       <tr align="left">
          <td>Pekerjaan Ayah</td>
          <td><input type="text" value="<?php echo set_value('pekerjaan_ayah', isset($biodata->PEKERJAAN_AYAH) ? $biodata->PEKERJAAN_AYAH : '');?>" id="pekerjaan_ayah" name="pekerjaan_ayah"></td>
       </tr>
       <tr align="left">
          <td>Pekerjaan Ibu</td>
          <td><input type="text" value="<?php echo set_value('pekerjaan_ibu', isset($biodata->PEKERJAAN_IBU) ? $biodata->PEKERJAAN_IBU : '');?>" id="pekerjaan_ibu" name="pekerjaan_ibu"></td>
       </tr>
       <tr align="left">
          <td width="180">Penghasilan Ayah (dalam Rupiah)</td>
          <td><input type="text" value="<?php echo set_value('penghasilan_ayah', isset($biodata->PENGHASILAN_AYAH) ? $biodata->PENGHASILAN_AYAH : '');?>" id="penghasilan_ayah" name="penghasilan_ayah"> <?php echo '<font color="red">'.form_error('penghasilan_ayah').'</font>' ?></td>
       </tr>
       <tr align="left">
          <td>Penghasilan Ibu (dalam Rupiah)</td>
          <td><input type="text" value="<?php echo set_value('penghasilan_ibu', isset($biodata->PENGHASILAN_IBU) ? $biodata->PENGHASILAN_IBU : '');?>" id="penghasilan_ibu" name="penghasilan_ibu"> <?php echo '<font color="red">'.form_error('penghasilan_ibu').'</font>' ?></td>
       </tr>
      </table>
   </div>
</div>
<br /><br />

<div align="center">
   <button class="sexybutton sexysimple sexyblue" name="simpan" type="submit" value="Simpan">Simpan</button>&nbsp;&nbsp;
   <button class="sexybutton sexysimple sexymagenta" name="batal" type="button" value="Batal" onclick="self.location='biodata.html'">Batal</button>
</div>

<?php endif; ?>

<br />
</div>
</form>
</div>